package com.hhk.project_01.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

/**
 * className:IndexController
 * package:com.hhk.project_01.web
 * description:这是一个web控制类
 */
@Controller
public class ViewController {
    @RequestMapping("/web")
    @ResponseBody
    public ModelAndView web(){
        ModelAndView modelAndView=new ModelAndView();
        modelAndView.addObject("message","这是第一个自主配置的jsp视图页面");
        modelAndView.setViewName("web");
        return modelAndView;
    }
}
